package com.yqg.protection.controller.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.protection.cover.AnnounceStateConverter;
import com.yqg.protection.cover.AnnounceTypeConverter;
import com.yqg.protection.cover.LocalDateTimeConverter;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * projectName:xf-service1
 * author:zxf
 * time:2024/10/24 11:14
 * description:
 */
@Data
public class ImportAnnounceDto {

    @ExcelProperty(value = "通知人ID(必填)", index = 0)
    private Long userId;

    @ExcelProperty(value = "单位ID(必填)", index = 1)
    private Long clientId;

    @ExcelProperty(value = "公告类型(设备)(必填)", index = 2, converter = AnnounceTypeConverter.class)
    private String type;

    @ExcelProperty(value = "设备ID(必填)", index = 3)
    private Long equipOrSimId;

    @ExcelProperty(value = "公告内容", index = 4)
    private String content;

    @ExcelProperty(value = "公告状态(已读/未读)(必填)", index = 5, converter = AnnounceStateConverter.class)
    private String state;

    @ExcelProperty(value = "公告时间", index = 6, converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
}
